package com.itheima.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.reggie.domain.Category;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface CategoryMapper extends BaseMapper<Category> {


    //查询分类模块
    List<Category> findAll();

    //添加分类
    void save(Category category);

    //修改分类
    //int updateById(Category category);

    //根据id查询dish表中菜品的数目
    Long countDishByCategoryId(Long id);

    //根据id查询setmeal表中套餐的数目
    Long countSetmealByCategoryId(Long id);

    //根据id删除
    void deleteById(Long id);
}
